Creating a Word Template
To create a Word template, follow the next steps:
1. Open Microsoft Office Word and include the body of text.
Give the document the required format by changing the font, font size, margins, headers, etc., according to your design.
The body of your document can include titles, subtitles, tables, texts, images, etc.
For example, to create an Invoice template in Word, we need the Customer's information and a table to show the Products purchased.
2. Reference the information that will be dynamically obtained from the Bizagi data model.
Remember that the information to be retrieved must be specified as Template Tags (e.g., [AttributeName]
). This will allow obtaining the information from the data model of the Process.
For example, the Customer name is referenced with the [CustomerName]
Template Tag.
To make reference to a collection, use the following tags:
[Foreach:CollectionName]
: Indicates the starting point of the collection.[AttributeName]
: All attributes between theForeach
and theEnd
tag must belong to the collection.[End]
: Indicates the end of the collection.
Note In the image above, the Products collection is referenced by using the [Foreach:Products]
sentence. All the tags typed from this tag until the [End]
tag are assumed to be attributes of this collection ([Product]
, [Quantity]
, [Price]
).
Note:
- The attribute and collection names can be different from the names given in the data model. These are only references for mapping the information.
- Tags cannot contain spaces.
- Every single tag for the columns of all collections MUST be unique. No two columns in a document can have the same tag name, even if they belong to different tables.
3. Save your template.
Once you have entered the desired format and the document body is completed, save the document as a standard Word Document (.docx
).
Notes:
- In a single document, you can include the same tag multiple times. You will only need to map it once.
- This rule DOES NOT apply to tags for collections. There can only be ONE tag for each [Foreach].